package com.jshoperxms.controller.utils.enums;

/**
 * Created by sdywcd on 16/11/20.
 * Des:
 */
public class MemberEnums {

    public enum MemberRechargeType {
        ALIPAY("支付宝", "1"), WECHATPAY("微信支付", "2"),UNIONBANK("网银","3"),SYS("系统代充","4");

        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private MemberRechargeType(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String tag) {
            for (MemberRechargeType d : MemberRechargeType.values()) {
                if (d.getState().equals(tag)) {
                    return d.getName();
                }
            }
            return "";
        }
    }

    public enum MemberWithdrawalsReviewed {
        PASS("通过", "1"), NO("未审核", "0"),REJECT("驳回","2");

        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private MemberWithdrawalsReviewed(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String tag) {
            for (MemberWithdrawalsReviewed d : MemberWithdrawalsReviewed.values()) {
                if (d.getState().equals(tag)) {
                    return d.getName();
                }
            }
            return "";
        }
    }

    public enum MemberWithdrawalsTransfer {
        HAVETRANSFER("已转账", "1"), NO("未转账", "0");

        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private MemberWithdrawalsTransfer(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String tag) {
            for (MemberWithdrawalsTransfer d : MemberWithdrawalsTransfer.values()) {
                if (d.getState().equals(tag)) {
                    return d.getName();
                }
            }
            return "";
        }
    }

}
